<?php
if (!defined('IN_ZWS')) exit();

class ArticleViewModel extends ViewModel {
	public $viewFields = array('Article' => array('id', 'res', 'gpid', 'gdid', 'sid', 'cid', 'uid', 'ctime', 'mtime', 'link', '`desc`', 'title', 'content'),
		'User' => array('username', 'email', '_on' => 'Article.uid=User.id', '_type' => "LEFT"),
		'GroupGroup' => array('cname' => 'gpname', '_on' => 'Article.gpid=GroupGroup.id', '_type' => "LEFT"),
		'GroupGrade' => array('cname' => 'gdname', '_on' => 'Article.gdid=GroupGrade.id', '_type' => "LEFT"),
		'GroupSubject' => array('cname' => 'sname', '_on' => 'Article.sid=GroupSubject.id', '_type' => "LEFT"),
		'GroupCategory' => array('cname', '_on' => 'Article.cid=GroupCategory.id', '_type' => "LEFT"),
		);
}